package com.lzw.mall.common.mapper;

import com.lzw.mall.common.entity.Attachment;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author lizhenwei
 * @since 2023-03-18
 */
public interface AttachmentMapper extends BaseMapper<Attachment> {

    void doInsert(String path);

    @Select("select * from attachment where source_id=#{pid} and source=#{source}")
    List<Attachment> selectList1(@Param("pid") Integer pid,@Param("source") String source);

    void doUpdateById(@Param("ids") String[] ids,@Param("sourceId") Integer sourceId,@Param("source") String source);

}
